<?php 
    if(!isset($_SESSION))
        session_start();
    if (!(isset($_SESSION['k_username'])) ) {
?>
        <script type="text/javascript"> 
                window.location="http://localhost/rspinf-usb/Login/login.php"; 
        </script> 
   
<?php
    }
   require_once($_SESSION['dir']."/basedatos.php");
   require_once($_SESSION['dir']."/Clases/evento.php");
   $id = $_GET['id'] ;
   $evento = Evento::buscarEvento($_GET['id']);
   if($evento == null){
?>
<script type="text/javascript">
   window.location="http://localhost/rspinf-usb/Evento/verEventos.php";
</script>
<?php
   }else{
   $evento->votar_gusta();
   echo "votaste por me gusta";
   }
?>
